

function GetCameraStatus()
{
	flashpoint();

printf('# API: GetCameraStatus(system,capture,vendor)  ');
printf('# only system contains valid values  ');
printf('# some important ones are  ');
printf('# ipip image processing in progress   ');
printf('# flsc file list status change  ');
printf('# from the Option menu list,select either ');
printf('# 1) Take Picture & Monitor');
printf('# 2) Just Monitor ');
printf('# monitor the hex values displayed ')
printf(' ');

  writeMenu('"GetCameraStatus"','"CMD"','"GetCameraStatus()"');
  writeVariables();
  printf(' ' );	
  printf('#DECLARE SYSTEM STATUS FLAG BITS ');
  printf('declare b: edla,ed2a,ramda,ipip,memf,pwra,flsc,trun ');
  printf('declare b: stst,stsc,cerr,mcro,sbs1,sbs2,zoom,extp,edch ');
  printf(' ' );	  
  printf('# DECLARE CAPTURE STATUS  FLAG BITS ');
  printf('declare u: camr,strc,strr,shkw,focl ');
  printf('declare u: expl,oexp,uexp,stfa,stcl ');
  printf(' ' );	
  printf('# DECLARE VENDOR STATUS FLAG BITS ');
  printf('declare b: hed1,hed2,hrmd,stdc, srun ');
  printf('declare b: serr, tnav,lors, rors,udos ');
 
  printf('<br>','#**** OPEN FILE ****');  
  printf('outFile="/System/ZCStat.txt"');
  writeFileOpen();

printf(' ');
printf('WriteLine(fd," API: GetCameraStatus(system,capture,vendor)  ")');
printf('WriteLine(fd," only system contains valid values  ")');
printf('WriteLine(fd," some important ones are  ")');
printf('WriteLine(fd," ipip image processing in progress  ") ');
printf('WriteLine(fd," flsc file list status change  ")');
printf('WriteLine(fd," from the Option menu list,select either ")');
printf('WriteLine(fd," 1) Take Picture & Monitor")');
printf('WriteLine(fd," 2) Just Monitor ")');
printf('WriteLine(fd," monitor the hex values displayed ")')
printf(' ');


	printf('<br>','# SYSTEM ' );	  
  for( i=1 ; i< systemBits.length ; i++ )
  	printf( systemBits[i].param  ,' = ', systemBits[i].bit );

	printf('<br>','# CAPTURE ');
  for( i=1 ; i< captureBits.length ; i++ )
  	printf( captureBits[i].param  ,' = ', captureBits[i].bit );

	printf('<br>','# VENDOR ' );	  
  for( i=1 ; i< vendorBits.length ; i++ )
  	printf( vendorBits[i].param  ,' = ', vendorBits[i].bit );


  	printf('<br>',' LOOP_OPTION: ');
  	printf(' DisplayClear() ');
  	printf(' SetOption(0,"About",0) ');
  	printf(' SetOption(1,"Take Picture & Monitor",1) ');
  	printf(' SetOption(2,"Just Monitor",0) ');
  	printf(' SetOption(100,"Quit") ');
  	printf(' GetOption(choice) ');
	
	printf(' ');
  	printf(' #******** ABOUT ************************************* ');
  	printf(' if choice == 0 ');
  	printf(' Display("Take a still picture and monitor the system, capture ") ');
  	printf(' Display("and vendor variables from SetCameraStatus ") ');
  	printf(' Display("only the ON bits are displayed") ');
  	printf(' Wait(5000) ');
  	printf(' goto LOOP_OPTION ');
  	printf(' end ');
	printf(' ');
  	printf(' if choice==100 ');
  	printf(' exitscript ');
  	printf(' end ');
	printf(' ');
	
  	printf(' #**************************************************** ');
  	printf(' #		start of test code ');
  	printf(' #**************************************************** ');
	printf(' ');
  	printf(' # *******TAKE A PICTURE **************************** ');
  	printf(' if choice == 1 ');
  	printf(' SetCaptureMode(still) ');
  	printf(' StartCapture() ');
  	printf(' EndCapture() ');
  	printf(' end ');

  	printf(' # always do the following code(for option 1 or 2) ');
  	printf(' status = GetCameraStatus(system,capture,vendor) ');

  	printf(' DisplayLine("system[",  status,"] ", system ) ');
  	printf(' DisplayLine("capture[", status,"] ", capture ) ');
  	printf(' DisplayLine("vendor[",  status,"] ", vendor ) ');
  	printf(' WriteLine(fd,"system[",  status,"] ", system ) ');
  	printf(' WriteLine(fd,"capture[", status,"] ", capture ) ');
  	printf(' WriteLine(fd,"vendor[",  status,"] ", vendor ) ');

	for(i=1 ; i<systemBits.length ; i++)
	{
		printf(' ');
		printf(' if system & ',systemBits[i].param  );
		printf(' Display("',systemBits[i].param, '") ');
		printf(' WriteLine( fd,"', systemBits[i].param,'" ) ');
		printf('end ');
	}

	printf(' Wait(2000) ');

	printf(' DisplayLine(" ") ');
	printf(' DisplayLine("***CAPTURE*** ") ');

	printf(' # CAPTURE ******************************** ');
	printf(' WriteLine(fd,"   ") ');
	printf(' WriteLine(fd,"***CAPTURE*** ") ');

	for(i=1 ; i<captureBits.length ; i++)
	{
		printf(' ');
		printf(' if capture & ',captureBits[i].param  );
		printf(' Display("',captureBits[i].param ,'" )');
		printf(' WriteLine( fd, "',captureBits[i].param,'" ) ');
		printf('end ');

	}

	printf(' # VENDOR STATUS *********************** ');
	printf(' WriteLine(fd," ") ');
	printf(' WriteLine(fd,"*** VENDOR ***") ');
	printf(' DisplayLine(" ") ');
	printf(' DisplayLine("*** VENDOR ***") ');
	printf(' Wait(500) ');

	for(i=1 ; i<vendorBits.length ; i++)
	{
		printf(' ');
		printf(' if vendor & ',vendorBits[i].param  );
		printf(' Display("',vendorBits[i].param ,'") ');
		printf(' WriteLine( fd, "',vendorBits[i].param,'" ) ');
		printf('end ');

	}

	printf(' DisplayLine(" ") ');

	printf(' Wait(3000) ');
	printf(' DisplayClear() ');
	printf(' goto LOOP_OPTION ');

	printf(' exitscript ');
}
